<include file="Public:header"/>
<div class="cat">
<form method="POST" action="__URL__/add">
	品牌：<input type="text" name="brand_name" size="20">
	logo：<input type="text" name="brand_logo" size="20">
	地址：<input type="text" name="brand_url" size="20">
	<input type="submit" value="添加品牌" name="B1">
</form>
</div>


<div class="cat" style="margin-top:5px;">
<table bordercolor="#DDDFFF" border="1" width="100%" style="border-collapse: collapse" cellpadding="3">
	<tr height="17" align="center">
		<td class="title" width="40">排序</td>
		<td class="title" width="100">品牌</td>
		<td class="title" width="100">logo</td>
		<td class="title" width="100">url</td>
		<td class="title" width="40">推荐</td>

		<td class="title" width="40">删除</td>
		<td class="title" width="80">查看商品</td>
		<td class="title">　</td>
	</tr>
<volist name="brand" id="brand">
	<tr height="20" bgcolor="#F1F5FA" class="cat_list">
		<td width="40">{$brand.sorting}</td>
		<td width="100"><a href="__URL__/edit/?bid={$brand.brand_id}">{$brand.brand_name}</a></td>
		<td width="100">{$brand.brand_log}</td>
		<td width="100">{$brand.brand_url}</td>
		<td width="40" align="center"><if condition="$brand.is_hot eq 'false' ">否<else/>是</if></td>
		<td width="40" align="center"><a href="javascript:;" onclick="del({$brand.brand_id})"><img alt="删除" src="__APP__/statics/icons/icon_delete.gif"></a></td>
		<td width="80" align="center"><a href="__GROUP__/Goods/goods_list/?brand={$brand.brand_id}"><img src="__APP__/statics/icons/cart.gif"></a></td>
		<td></td>
	</tr>
</volist>
</table>
</div>

<script>
function del(t){
	if(confirm('你确认删除？')) {
		$.get('__URL__/del',{id:t},function(res){
			if(res == 0){
				alert("删除成功");
				location.reload();
			}else{
				alert("删除失败");
			}
		})
	}
}
</script>



